package com.kyh.common;

/**
 * 
 * @author Jason
 * @date 2017-02-03
 * @version 1.0
 */
public class Result {
	  
	private String resultMsg; // 结果消息
	private boolean result; // 结果
	
	public String getResultMsg() {
		return resultMsg;
	}
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
	public boolean isResult() {
		return result;
	}
	public void setResult(boolean result) {
		this.result = result;
	}
	
	public static Result success(){
		Result bo = new Result();
		bo.setResult(true);
		return bo;
	}
    
	public static Result success(String msg){
		Result bo = new Result();
		bo.setResult(true);
		bo.setResultMsg(msg);
		return bo;
	}
    
	public static Result failed(String msg){
		Result bo = new Result();
		bo.setResult(false);
		bo.setResultMsg(msg);
		return bo;
	}
}
